home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 7 / BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso / Files / Tele / S / SEND AN ESCAPE < prev    next >
Text File  |  1991-01-02  |  4KB  |  94 lines

  1.       HOW TO FORCE SECOND SIGHT TO SEND AN ESCAPE CHARACTER v2
  2.  
  3. While it recently became possible to change Second Sight so that
  4. it would display and send a number of graphics characters in the
  5. IBM ANSI character set, until now it wasn't possible to send any
  6. of the escape sequences which allow use of cursor control, alternate
  7. character styles, and animation although most terminal packages were
  8. able to use them. This 'quick and dirty' fix will allow you to send
  9. these sequences to your users.
  10.  
  11. The reason you can not send these commands is because Second Sight
  12. refuses to acknowledge any characters below ASCII #32 ($20) except
  13. for the backspace, return, etc. There is a line in the program that
  14. compares all sent and displayed characters to 32 (a space) and if it
  15. is lower it will not print it. If Second Sight were written in Pascal,
  16. it might look like this:
  17.  
  18.     If Character >= asc(32) then Print(Character)
  19.        else
  20.       SysBeep(1);
  21.  
  22. This little fix changes the 'asc(32)' in our example to 'asc(27)', which
  23. tells Second Sight to print any character above ASCII #27 ($1B) which is
  24. the ASCII code for escape. Thus, when Second Sight comes across with an
  25. escape character - whether in a menu, text file, or simply entered by
  26. the user - it will print that character.
  27.  
  28. You should be aware that because Second Sight does not have the ability
  29. to actually display ansi codes, what you see on the screen will not be
  30. bold, inversed, etc. Whenever you use an escape code, all you will see
  31. is the actual sequence. However, your users will not see this text, but
  32. rather the result of the code.
  33.  
  34. Oh, I almost forgot to mention that this little fix also lets you use
  35. color as well.
  36.  
  37. Down to business. The following is an explaination of how to change
  38. Second Sight to send escape characters. Remember,
  39.  
  40.   -----------------------------------------------------------------------
  41.   ONLY MAKE THESE CHANGES ON A COPY OF SECOND SIGHT..NOT ON YOUR ORIGINAL.
  42.   -----------------------------------------------------------------------
  43.  
  44. I take no responsibility (and I'm sure Freesoft won't either) for any
  45. distruction this causes to your copy of Second Sight, so do this only on
  46. a backup copy of the program.
  47.  
  48. THE PROCEDURE
  49. -------------
  50.  
  51. What you need:        Copy of Second Sight
  52.                       Hex file editor with search function (SUM, for ex.)
  53.  
  54. 1) Open Second Sight with your text editor. Make sure you are editing
  55.    the resource fork.
  56.  
  57. 2) Search for the hexidecimal string: 0020 6400 0138 7000
  58.  
  59. 3) Change '0020' in the above string to '001A'.
  60.  
  61. 4) Search for the hexidecimal string: 001F 6300 0074 7000 102D
  62.  
  63. 5) Change '001F' in the above string to '001A'.
  64.  
  65. 6) Save your changes.
  66.  
  67. Once you have made these changes, Second Sight will now send escape
  68. characters (as well as all of the characters above it.
  69.  
  70. It is possible to change the '0020' (space) to any character you wish.
  71. However, I don't recommend this and I certainly would not make the
  72. number lower than '$000E', since if you do, Second Sight will no longer
  73. be able to properly handle carraige returns ($000D) or backspaces
  74. ($0008) or other necessary characters. However, testing this change has
  75. shown that changing the '$0020' limitation to escape '$001B' has no
  76. negative effects.
  77.  
  78. If you have any questions about this procedure, or how to use the escape
  79. codes to generate bold, inverse, underlined or colored characters,
  80. please feel free to send me mail.
  81.  
  82.  -Mark
  83.  
  84.   Mark Kupferman
  85.   25 St. Stephen Street, #6
  86.   Boston, MA  02115
  87.  
  88.   GEnie:           M.S.K.
  89.   America Online:  MSK
  90.   Internet:        mkupferman@lynx.northeastern.edu
  91.   BBS:             Tao of Telecom/(617) 536-6419 (up again soon)
  92.  
  93.